package com.efast.dmom.mgmt.controller.les;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.efast.cafe.framework.bean.ResultBean;
import com.efast.dmom.mgmt.bean.les.TwInvSkuLoctlBean;
import com.efast.dmom.mgmt.service.les.TwInvSkuLoctlService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author ChenLiPeng
 * @Description: 库存移动
 * @date 2018年3月28日
 */
@Controller
@RequestMapping(value = "/inventoryMovement")
@Api(description = "库存移动")
public class InventoryMovementController {

    private final TwInvSkuLoctlService twInvSkuLoctlService;

    @Autowired
    public InventoryMovementController(TwInvSkuLoctlService twInvSkuLoctlService) {
        this.twInvSkuLoctlService = twInvSkuLoctlService;
    }

    @ApiOperation(value = "库存移动", notes = "")
    @RequestMapping(value = "/move", method = RequestMethod.POST)
    public @ResponseBody
    ResultBean line(@RequestBody TwInvSkuLoctlBean twInvSkuLoctlBean) {
        ResultBean result = new ResultBean(true, "'");
        twInvSkuLoctlService.inventoryMovement(twInvSkuLoctlBean);
        result.setMessage("库存移动成功");
        return result;
    }

}
